package com.yinhai.app.demo.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.yinhai.app.demo.service.DemoService;
import com.yinhai.common.service.impl.BaseServiceImpl;
@Service("demoService")
public class DemoServiceImpl extends BaseServiceImpl implements DemoService {
	
	@Override
	public List<?> queryList(Map<?, ?> param) {
		return  getDao().getSqlSessionTemplate().selectList("demo.select", null);
	}
	
	@Transactional
	@Override
	public Integer insertDemo(Map<?, ?> map) throws Exception {
		Integer num = null;
		num = (Integer) getDao().save("demo.insert_a", map);
		int a = num/0;
		return num;
	}
	
}
